/**
 * Menu generation process related types
 */

export type GenerationStatus = 'idle' | 'generating' | 'success' | 'error';
export type GenerationStepStatus = 'pending' | 'running' | 'completed' | 'error';

export interface GenerationStep {
  id: string;
  name: string;
  status: GenerationStepStatus;
  timestamp: string;
  duration?: number;
  details?: string;
  progress?: number;
}

export interface AICallLog {
  id: string;
  model: string;
  prompt: string;
  response: string;
  timestamp: string;
  duration: number;
  tokenUsage: {
    prompt_tokens: number;
    completion_tokens: number;
    total_tokens: number;
  };
}

export interface GenerationState {
  generationStatus: GenerationStatus;
  currentStep: string;
  progress: number;
  stepLogs: GenerationStep[];
  aiModelCalls: AICallLog[];
  generatedMenu: any | null;
  errorMessage: string;
  taskId: string | null;
  startTime: string | null;
  endTime: string | null;
  isCancelled: boolean;
}

export interface GenerationResult {
  taskId: string;
  status: GenerationStatus;
  menuData: any;
  logs: GenerationStep[];
  aiCalls: AICallLog[];
  duration: number;
  error?: string;
}